home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / dviware / dvitovdu32 / src / pascal / globals.h < prev    next >
Text File  |  1991-11-10  |  2KB  |  58 lines

  1. (* Global declarations for DVItoVDU *)
  2.  
  3. CONST
  4.    (* Character bitmap sizes in 32-bit words.
  5.       Note that "W" in cminch.432pk requires 8640 words.
  6.    *)
  7.    small_size = 50;      (* handles most 10..12pt char bitmaps at 300dpi *)
  8.    big_size   = 100;
  9.    large_size = 500;
  10.    huge_size  = 10000;
  11.  
  12.    maxstring  = 80;
  13.    maxstringm = maxstring - 1;
  14.  
  15. TYPE
  16.    string = PACKED ARRAY [0..maxstringm] OF CHAR;
  17.  
  18.    BITSETPTR = ^BITSET;        (* pointer to 32-bit word *)
  19.    BITSET    = SET OF 0..31;
  20.  
  21.    (* The following variant records are needed because Pyramid Pascal
  22.       does not provide type coercion.
  23.       Note that we couldn't overlay INTEGER and BITSET because
  24.       of the crazy storage scheme used to represent a set of 0..31
  25.       where the bit order within a word is 7..0 15..8 23..16 31..24!
  26.    *)
  27.  
  28.    bytes_or_bits = RECORD
  29.                    CASE b : BOOLEAN OF
  30.                       TRUE  : (ch   : PACKED ARRAY [0..3] OF CHAR);
  31.                       FALSE : (bits : BITSET);
  32.                    END;
  33.  
  34.    int_or_bptr = RECORD
  35.                  CASE b : BOOLEAN OF
  36.                     TRUE  : (int  : INTEGER);
  37.                     FALSE : (bptr : BITSETPTR);
  38.                  END;
  39.  
  40.    bitmap_size = (small,big,large,huge);
  41.    bitmap_ptr  = ^bitmap_rec;
  42.    bitmap_rec  = RECORD
  43.                  CASE bitmap_size OF
  44.                     small : (s : PACKED ARRAY [1..small_size] OF BITSET);
  45.                     big   : (b : PACKED ARRAY [1..big_size] OF BITSET);
  46.                     large : (l : PACKED ARRAY [1..large_size] OF BITSET);
  47.                     huge  : (h : PACKED ARRAY [1..huge_size] OF BITSET);
  48.                  END;
  49.  
  50.    int_or_mptr = RECORD
  51.                  CASE b : BOOLEAN OF
  52.                     TRUE  : (int  : INTEGER);
  53.                     FALSE : (mptr : bitmap_ptr);
  54.                  END;
  55.  
  56. PROCEDURE exit (status : integer);   EXTERNAL;
  57.                (* 0 = success, 1 = error *)
  58.